package Car;

public class Car {
	
	private int MPG;
	private double tankLevel;
	
	public Car(int milesPerGallon)
	{
		MPG = milesPerGallon;
	}

	public void addGas(int gallons)
	{
		tankLevel = tankLevel + gallons;
	}
	
	public void drive(int distanceTraveled)
	{
		tankLevel = tankLevel - (distanceTraveled / MPG);
	}
	
	public double getGas()
	{
		return tankLevel;
	}
}
